package com.peaksport.framework.exception;


/**
 * 已知业务功能类异常
 * 
 * 在edge网关服务只接受InvocationException异常,任何异常也都会配封装成InvocationException后再转发给edge
 * 需与com.peaksport.framework.extend.swagger.PKBizExceptionToResponseConverter配合使用,对异常重新封装
 *
 * @author jinbin_guo 2019年4月20日
 *
 */
@SuppressWarnings("serial")
public class PKBizException extends RuntimeException {


	public PKBizException(String errmsg) {
		super(errmsg);
	}
	public PKBizException(Throwable cause) {
		super(cause);
	}
	
	public static PKBizException throwException(String errmsg, Object... args) {
		String newErrmsg = String.format(errmsg, args);
		PKBizException exc = new PKBizException(newErrmsg);
		return exc;
		
	}
}
